package com.zdsoft.crm.util;

import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class DbUtil {

	public static boolean bakDb() {
		String bakFile = "C:\\Users\\Administrator\\Desktop\\daochu1.dmp";
		String expFile = "C:\\app\\TeacherRen\\product\\11.2.0\\dbhome_1\\BIN\\exp.exe";

		String[] cmd = { expFile, "test/test@ORCL", "file=" + bakFile, "owner=(test)" };
		try {
			Runtime.getRuntime().exec(cmd);
			return true;
		} catch (IOException e) {
			// e.printStackTrace();
			return false;
		}
	}
	
}
